chcp 65001 | Out-Null
# 设置代码页为 UTF-8
[Console]::OutputEncoding = [System.Text.Encoding]::UTF8

# 保存当前工作目录
$originalLocation = Get-Location

# 设置工作目录为脚本所在目录
$scriptPath = Split-Path -Parent $MyInvocation.MyCommand.Path
Set-Location $scriptPath

$script_name = "blenderBranchCatalog.py"

# 设置变量
$PythonEnv = "S:\Dev\anaconda\main\envs\tools\python.exe"
$Py_script_path = Join-Path "C:\Users\SongJuYi\Documents\2_Ide_Desk\PyCharm_WS\GWScript\script" $script_name 
$File_path = Join-Path $scriptPath "..\config.yaml"
$Out_path = Join-Path $scriptPath "..\.assets\Branch_Catalog.md"

# 执行 Python 脚本
& $PythonEnv $Py_script_path $File_path $Out_path

# 恢复原始工作目录
Set-Location $originalLocation